package com.spi.listener;

import lombok.extern.slf4j.Slf4j;
import org.apache.rocketmq.spring.annotation.RocketMQMessageListener;
import org.apache.rocketmq.spring.core.RocketMQListener;
import org.springframework.stereotype.Component;

@RocketMQMessageListener(topic = "test-topic", consumerGroup = "springboot_consumer_group")
@Component
@Slf4j
public class ListenerConfig implements RocketMQListener<String> {

    @Override
    public void onMessage(String string) {
        System.out.println("receive message: " + string);
    }
}
